package com.qqtech.qquan.idle.model;

import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import com.qqtech.core.common.util.StringUtil;
import com.qqtech.core.common.util.TimeUtil;

@SuppressWarnings("serial")
public class IdleBaseVo extends IdleBase {
	private String typeName;

	/**
	 * 模板
	 */
	private Integer template;

	private String communityName;

	private String userNick;

	private String userLogo;

	private Integer replyCount;

	private Integer praiseCount;

	/** 是否被当前登录人点过赞;1-是,2-否 **/
	private java.lang.Integer isPraised;

	/** 是否被当前登录人关注;1-是,2-否 **/
	private java.lang.Integer isConcern;
	
	/** 是否显示点赞人列表 **/
	private java.lang.Boolean isShowPraiseList;

	/** 点赞人列表 **/
	private java.lang.String praiseUserList;
	
	public java.lang.Boolean getIsShowPraiseList() {
		return isShowPraiseList;
	}

	public void setIsShowPraiseList(java.lang.Boolean isShowPraiseList) {
		this.isShowPraiseList = isShowPraiseList;
	}

	public java.lang.String getPraiseUserList() {
		return praiseUserList;
	}

	public void setPraiseUserList(java.lang.String praiseUserList) {
		this.praiseUserList = praiseUserList;
	}

	public String getCommunityName() {
		return communityName;
	}

	public String getFullUserLogo() {
		if (StringUtil.isNotBlank(getUserLogo())) {
			return super.getFileDomain() + "" + getUserLogo();
		}
		return null;
	}

	public java.lang.Integer getIsConcern() {
		return isConcern;
	}

	public java.lang.Integer getIsPraised() {
		return isPraised;
	}

	/** 是否显示图片 **/
	public boolean getIsShowImg() {
		if (StringUtils.isNotBlank(this.getImg())) {
			return true;
		} else {
			return false;
		}
	}
	
	public String getPathImgs() {
		if (StringUtil.isBlank(this.getImg())) {
			return "";
		}
		String filePath = ";" + this.getFileDomain();
		String pathImgs = this.getImg().replaceAll(";", filePath);
		return this.getFileDomain() + pathImgs;
	}
	
	public String getStrUpdAt() {
		return TimeUtil.getStringTimeByFormat(getUpdAt(), "yyyy-MM-dd HH:mm");
	}

	public String getStrNewAt() {
		return TimeUtil.getStringTimeByFormat(getNewAt(), "yyyy-MM-dd HH:mm");
	}

	public Integer getPraiseCount() {
		return praiseCount;
	}

	public Integer getReplyCount() {
		return replyCount;
	}

	public Integer getTemplate() {
		return template;
	}

	public String getTypeName() {
		return typeName;
	}

	public String getUserLogo() {
		return userLogo;
	}

	public String getUserNick() {
		return userNick;
	}

	public void setCommunityName(String communityName) {
		this.communityName = communityName;
	}

	public void setIsConcern(java.lang.Integer isConcern) {
		this.isConcern = isConcern;
	}

	public void setIsPraised(java.lang.Integer isPraised) {
		this.isPraised = isPraised;
	}

	public void setPraiseCount(Integer praiseCount) {
		this.praiseCount = praiseCount;
	}

	public void setReplyCount(Integer replyCount) {
		this.replyCount = replyCount;
	}

	public void setTemplate(Integer template) {
		this.template = template;
	}

	public void setTypeName(String typeName) {
		this.typeName = typeName;
	}

	public void setUserLogo(String userLogo) {
		this.userLogo = userLogo;
	}

	public void setUserNick(String userNick) {
		this.userNick = userNick;
	}

	@Override
	public String toString() {
		return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE);
	}
}